/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUI;

import DAO.PerfilesDAO;
import DTO.*;
import java.awt.Rectangle;
import java.util.ArrayList;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableColumn;
import javax.swing.table.TableColumnModel;
public class PermitirAsignarRolesUser extends javax.swing.JFrame {

  usuarioDTO user;
    PerfilesDAO reg = new PerfilesDAO();
    DefaultTableModel modelo;
    DefaultTableModel modelo2;
    DefaultTableModel modelo3;
    DefaultTableModel modelo4;
    
    public PermitirAsignarRolesUser(usuarioDTO user) {
       
        this.user = user;
        initComponents();
       cargarPerfiles(); 
       this.setDefaultCloseOperation(this.EXIT_ON_CLOSE);
        
        
    }

    private void cargarPerfiles(){
    ArrayList<Perfil> lista = reg.listarPerfiles();
    modelo = (DefaultTableModel)this.tbSalida.getModel();
    modelo2= (DefaultTableModel)this.tbSalida2.getModel();
    modelo3= (DefaultTableModel)this.tbSalida3.getModel();
    modelo4= (DefaultTableModel)this.tbSalida4.getModel();
    modelo.setNumRows(0);
    for(Perfil z : lista){
       Object [] arr= {
           z.getNom_perfil(),
           z.isMenuPrincipal(),
           z.isIngresoGarantias(),
           z.isIngresoGarante(),
           z.isAprobacionGarantias(),
           z.isModificionGarantias(),
           z.isModificacionGarante(),                          
                  };
          modelo.addRow(arr);
    }
    
    modelo2.setNumRows(0);
    for(Perfil f : lista){
    Object [] arr ={
           f.getNom_perfil(),
           f.isEliminacionGarantias(),
           f.isEliminacionGarante(),
           f.isTasacionGarantias(),
           f.isRelacionGarantiaOperacion(),
           f.isRelacionGarantiaSeguro(),  
    };
    modelo2.addRow(arr);
    }
    
    modelo3.setNumRows(0);
    for(Perfil h : lista){
    Object [] arr ={
           h.getNom_perfil(),      
           h.isMantencionTasacionGarantia(),
           h.isMantencionRelacionGarantiaOperacion(),
           h.isMantencionRelacionGarantiaSeguro(),
           h.isAlzamiento(),
//           h.isAprobacionAlzamiento(),
//           h.isBuscarListaGarantia(),
//           h.isFormularioTasacionGarantia(),
//           h.isInformeTotalGarantia(),
//           h.isReporteVencimientoGarantia()  
    };
    modelo3.addRow(arr);
    }
    
    modelo4.setNumRows(0);
    for(Perfil j : lista){
    Object [] arr ={
           j.getNom_perfil(),               
           j.isAprobacionAlzamiento(),
           j.isBuscarListaGarantia(),
           j.isFormularioTasacionGarantia(),
           j.isInformeTotalGarantia(),
           j.isReporteVencimientoGarantia()  
    };
    modelo4.addRow(arr);
    }
//    new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
   
    TableColumnModel modeloColumna = tbSalida.getColumnModel(); 
    int anchoColumna = 0;
    TableColumn columnaTabla;
        for (int i = 0; i < tbSalida.getColumnCount(); i++) { 
            columnaTabla = modeloColumna.getColumn(i);
           
            switch(i){ 
                case 0: anchoColumna = (90); 
                        break; 
                case 1: anchoColumna = (115); 
                        break; 
                case 2: anchoColumna = (130); 
                        break; 
                case 3: anchoColumna = (130); 
                        break; 
                case 4: anchoColumna = (120); 
                        break; 
                case 5: anchoColumna = (135); 
                        break;             
            }                      
            columnaTabla.setPreferredWidth(anchoColumna);    
        }
        
        TableColumnModel modeloColumnas = tbSalida2.getColumnModel(); 
    int anchoColumnas = 0;
    TableColumn columnaTablas;
        for (int i = 0; i < tbSalida2.getColumnCount(); i++) { 
            columnaTablas = modeloColumnas.getColumn(i);
           
            switch(i){ 
                case 0: anchoColumnas = (90); 
                        break; 
                case 1: anchoColumnas = (125); 
                        break; 
                case 2: anchoColumnas = (125); 
                        break;
                case 3: anchoColumnas = (120); 
                        break;
                case 4: anchoColumnas = (170); 
                        break;
                case 5: anchoColumnas = (225); 
                        break;
            }                      
            columnaTablas.setPreferredWidth(anchoColumnas);    
        }
        
         TableColumnModel modeloColumnas3 = tbSalida3.getColumnModel(); 
    int anchoColumnas3 = 0;
    TableColumn columnaTablas3;
        for (int i = 0; i < tbSalida3.getColumnCount(); i++) { 
            columnaTablas3 = modeloColumnas3.getColumn(i);
           
            switch(i){ 
                case 0: anchoColumnas3 = (90); 
                          break;          
                case 1: anchoColumnas3 = (170); 
                        break;
                case 2: anchoColumnas3 = (234); 
                        break;    
                case 3: anchoColumnas3 = (220); 
                        break;
                case 4: anchoColumnas3 = (141); 
                        break;                      
            }                      
            columnaTablas3.setPreferredWidth(anchoColumnas3);    
        }
        
        TableColumnModel modeloColumnas4 = tbSalida4.getColumnModel(); 
    int anchoColumnas4 = 0;
    TableColumn columnaTablas4;
        for (int i = 0; i < tbSalida4.getColumnCount(); i++) { 
            columnaTablas4 = modeloColumnas4.getColumn(i);
           
            switch(i){ 
                case 0: anchoColumnas4 = (90); 
                          break;                       
                case 1: anchoColumnas4 = (140); 
                        break;    
                case 2: anchoColumnas4 = (130); 
                        break;
                case 3: anchoColumnas4 = (180); 
                        break;  
                case 4: anchoColumnas4 = (135); 
                        break;
                case 5: anchoColumnas4 = (180); 
                        break;             
                
            }                      
            columnaTablas4.setPreferredWidth(anchoColumnas4);    
        }
    
}
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel2 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tbSalida = new javax.swing.JTable();
        jScrollPane3 = new javax.swing.JScrollPane();
        tbSalida2 = new javax.swing.JTable();
        jScrollPane2 = new javax.swing.JScrollPane();
        tbSalida3 = new javax.swing.JTable();
        jScrollPane4 = new javax.swing.JScrollPane();
        tbSalida4 = new javax.swing.JTable();
        btnVolverPerfil = new javax.swing.JButton();
        btnGuardarCambios = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("ASIGNAR ROLES DE USUARIOS");
        setResizable(false);

        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/IMAGE/logo.JPG"))); // NOI18N

        jLabel4.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        jLabel4.setText("ASIGNAR PERFILES DE USUARIOS ");

        jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        tbSalida.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Perfil", "Menú Principal", "Ingreso Garantia", "Ingreso Garante", "Aprobación Garantia", "Modificación Garantia", "Modificación Garante"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.Boolean.class, java.lang.Boolean.class, java.lang.Boolean.class, java.lang.Boolean.class, java.lang.Boolean.class, java.lang.Boolean.class
            };
            boolean[] canEdit = new boolean [] {
                false, true, true, true, true, true, true
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tbSalida.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        tbSalida.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        tbSalida.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tbSalidaMouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(tbSalida);

        tbSalida2.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Perfil", "Eliminación Garantia", "Eliminación Garante", "Tasación Garantia", "Relación Garantia Operación", "Relación Garantia Seguro"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.Boolean.class, java.lang.Boolean.class, java.lang.Boolean.class, java.lang.Boolean.class, java.lang.Boolean.class
            };
            boolean[] canEdit = new boolean [] {
                false, true, true, true, true, true
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tbSalida2.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        tbSalida2.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        tbSalida2.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tbSalida2MouseClicked(evt);
            }
        });
        jScrollPane3.setViewportView(tbSalida2);

        tbSalida3.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Perfil", "Manteción Tasación Garantia", "Mantención Relación Garantia Operación", "Mantención Relación Garantia Seguro", "Alzamiento"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.Boolean.class, java.lang.Boolean.class, java.lang.Boolean.class, java.lang.Boolean.class
            };
            boolean[] canEdit = new boolean [] {
                false, true, true, true, true
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tbSalida3.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        tbSalida3.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        tbSalida3.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tbSalida3MouseClicked(evt);
            }
        });
        jScrollPane2.setViewportView(tbSalida3);

        tbSalida4.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Perfil", "Aprobación Alzamiento", "Buscar Lista Garantia", "Formulario Tasación Garantia", "Informe Total Garantia", "Reporte Vencimiento Garantia"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.Boolean.class, java.lang.Boolean.class, java.lang.Boolean.class, java.lang.Boolean.class, java.lang.Boolean.class
            };
            boolean[] canEdit = new boolean [] {
                false, true, true, true, true, true
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tbSalida4.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        tbSalida4.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        tbSalida4.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tbSalida4MouseClicked(evt);
            }
        });
        jScrollPane4.setViewportView(tbSalida4);

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 858, Short.MAX_VALUE)
            .addComponent(jScrollPane2)
            .addComponent(jScrollPane4)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING)
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        btnVolverPerfil.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnVolverPerfil.setText("Volver");
        btnVolverPerfil.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVolverPerfilActionPerformed(evt);
            }
        });

        btnGuardarCambios.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnGuardarCambios.setText("Guardar Cambios");
        btnGuardarCambios.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGuardarCambiosActionPerformed(evt);
            }
        });

        jLabel1.setText("MENÚ ADMINISTRADOR\\ASIGNAR PERFILES DE USUARIOS");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(255, 255, 255)
                        .addComponent(btnGuardarCambios)
                        .addGap(56, 56, 56)
                        .addComponent(btnVolverPerfil)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel2)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createSequentialGroup()
                                        .addGap(111, 111, 111)
                                        .addComponent(jLabel4))
                                    .addGroup(layout.createSequentialGroup()
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jLabel1)))))))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel4)
                    .addComponent(jLabel2)
                    .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING))
                .addGap(18, 18, 18)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnGuardarCambios)
                    .addComponent(btnVolverPerfil))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        setSize(new java.awt.Dimension(896, 635));
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void btnVolverPerfilActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVolverPerfilActionPerformed
        MenuAdministrador menuAdmi = new MenuAdministrador(user);
        menuAdmi.setVisible(true);
        PermitirAsignarRolesUser.this.dispose();
    }//GEN-LAST:event_btnVolverPerfilActionPerformed

    private void btnGuardarCambiosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGuardarCambiosActionPerformed
       //jTPerfiles. getSelectionModel().clearSelection();
       //jTPerfiles.changeSelection(0,0,false,false);
       //jTPerfiles.addMouseListener(null);
      Perfil p =  new Perfil();
        
        int x;    
        for(x=0; x<modelo.getRowCount(); x++){
        if(x >= 0){
        p.setMenuPrincipal(Boolean.parseBoolean(modelo.getValueAt(x,1).toString().trim())); 
        p.setIngresoGarantias(Boolean.parseBoolean(modelo.getValueAt(x, 2).toString().trim()));
        p.setIngresoGarante(Boolean.parseBoolean(modelo.getValueAt(x, 3).toString().trim()));
       p.setAprobacionGarantias(Boolean.parseBoolean(modelo.getValueAt(x,4).toString().trim()));
       p.setModificionGarantias(Boolean.parseBoolean(modelo.getValueAt(x,5).toString().trim()));
       p.setModificacionGarante(Boolean.parseBoolean(modelo.getValueAt(x,6).toString().trim()));
        p.setCod_perfil(Integer.parseInt(String.valueOf(x+1)));
    
       reg.modificarPerfil(p);
        }
        }
       
        int a;
        for(a=0; a<modelo2.getRowCount(); a++){
        if(a >= 0){
       p.setEliminacionGarantias(Boolean.parseBoolean(modelo2.getValueAt(a,1).toString().trim()));
       p.setEliminacionGarante(Boolean.parseBoolean(modelo2.getValueAt(a,2).toString().trim()));
       p.setTasacionGarantias(Boolean.parseBoolean(modelo2.getValueAt(a,3).toString().trim()));
       p.setRelacionGarantiaOperacion(Boolean.parseBoolean(modelo2.getValueAt(a,4).toString().trim()));
       p.setRelacionGarantiaSeguro(Boolean.parseBoolean(modelo2.getValueAt(a,5).toString().trim()));
        p.setCod_perfil(Integer.parseInt(String.valueOf(a+1)));
    
       reg.modificarPerfil2(p);
        }
        }

        int b;
         for(b=0; b<modelo3.getRowCount(); b++){
        if(b >= 0){
       p.setMantencionTasacionGarantia(Boolean.parseBoolean(modelo3.getValueAt(b,1).toString().trim()));
       p.setMantencionRelacionGarantiaOperacion(Boolean.parseBoolean(modelo3.getValueAt(b,2).toString().trim()));
       p.setMantencionRelacionGarantiaSeguro(Boolean.parseBoolean(modelo3.getValueAt(b,3).toString().trim()));
       p.setAlzamiento(Boolean.parseBoolean(modelo3.getValueAt(b,4).toString().trim()));
        p.setCod_perfil(Integer.parseInt(String.valueOf(b+1)));
    
       reg.modificarPerfil3(p);
        }
        }
         
          int c;
           for(c=0; c<modelo4.getRowCount(); c++){
        if(c >= 0){
       p.setAprobacionAlzamiento(Boolean.parseBoolean(modelo4.getValueAt(c,1).toString().trim()));
       p.setBuscarListaGarantia(Boolean.parseBoolean(modelo4.getValueAt(c,2).toString().trim()));
       p.setFormularioTasacionGarantia(Boolean.parseBoolean(modelo4.getValueAt(c,3).toString().trim()));
       p.setInformeTotalGarantia(Boolean.parseBoolean(modelo4.getValueAt(c,4).toString().trim()));
       p.setReporteVencimientoGarantia(Boolean.parseBoolean(modelo4.getValueAt(c,5).toString().trim()));
        p.setCod_perfil(Integer.parseInt(String.valueOf(c+1)));
    
       reg.modificarPerfil4(p);
        }
        }
         
        javax.swing.JOptionPane.showMessageDialog(null,"Modificaciones guardadas correctamente ");
                              
    }//GEN-LAST:event_btnGuardarCambiosActionPerformed

    private void tbSalidaMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tbSalidaMouseClicked
      
    }//GEN-LAST:event_tbSalidaMouseClicked

    private void tbSalida3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tbSalida3MouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_tbSalida3MouseClicked

    private void tbSalida2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tbSalida2MouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_tbSalida2MouseClicked

    private void tbSalida4MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tbSalida4MouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_tbSalida4MouseClicked

    /**
     * @param args the command line arguments
     */
//    public static void main(String args[]) {
//        /*
//         * Set the Nimbus look and feel
//         */
//        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
//        /*
//         * If Nimbus (introduced in Java SE 6) is not available, stay with the
//         * default look and feel. For details see
//         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
//         */
//        try {
//            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
//                if ("Nimbus".equals(info.getName())) {
//                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
//                    break;
//                }
//            }
//        } catch (ClassNotFoundException ex) {
//            java.util.logging.Logger.getLogger(PermitirAsignarRolesUser.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (InstantiationException ex) {
//            java.util.logging.Logger.getLogger(PermitirAsignarRolesUser.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (IllegalAccessException ex) {
//            java.util.logging.Logger.getLogger(PermitirAsignarRolesUser.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
//            java.util.logging.Logger.getLogger(PermitirAsignarRolesUser.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        }
//        //</editor-fold>
//
//        /*
//         * Create and display the form
//         */
//        java.awt.EventQueue.invokeLater(new Runnable() {
//
//            public void run() {
//                new PermitirAsignarRolesUser().setVisible(true);
//            }
//        });
//    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnGuardarCambios;
    private javax.swing.JButton btnVolverPerfil;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JTable tbSalida;
    private javax.swing.JTable tbSalida2;
    private javax.swing.JTable tbSalida3;
    private javax.swing.JTable tbSalida4;
    // End of variables declaration//GEN-END:variables
}
